package dyy.zc.campuspay.ui.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;


/**
 * 作者：chs on 2016/9/6 16:07
 * 邮箱：657083984@qq.com
 */
public class PieChartActivity extends AppCompatActivity {
    //private int[] mColors = {0xFFCCFF00, 0xFF6495ED};
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_pie_chart);
//        PieChart pieChart = (PieChart) findViewById(R.id.chart);
//        List<PieDataEntity> dataEntities = new ArrayList<>();
//       // for(int i = 0;i<2;i++){
//            //PieDataEntity entity = new PieDataEntity("name"+i,i+1,mColors[i]);
//            PieDataEntity entity = new PieDataEntity("name",34,0xFFFF00FF);
//            PieDataEntity entity1 = new PieDataEntity("支出",16,0xFF4B0082);
//            PieDataEntity entity2 = new PieDataEntity("支出111",50,0xFF85FF03);
//            dataEntities.add(entity);
//            dataEntities.add(entity1);
//            dataEntities.add(entity2);
//       // }
//        pieChart.setDataList(dataEntities);

       /* pieChart.setOnItemPieClickListener(new PieChart.OnItemPieClickListener() {
            @Override
            public void onClick(int position) {
                Toast.makeText(PieChartActivity.this,"点击了"+position,Toast.LENGTH_SHORT).show();
            }
        });*/
    }
}
